package sz.szsmk.citizencard.util;

import android.app.Activity;
import android.view.WindowManager;

public class ScrennLight {
    public static void setBrightness(Activity activity, int brightness) {
        WindowManager.LayoutParams lp = activity.getWindow().getAttributes();
        lp.screenBrightness = Float.valueOf(brightness) * (1f / 255f);
        activity.getWindow().setAttributes(lp);
    }
}
